class: center, middle, inverse, title-slide .title[ # Phase II: Using Our Toolbox ] .subtitle[ ## Module 6: The Shape of Pretty Things Part Deux ] .author[ ### Dr. Christopher Kenaley ] .institute[ ### Boston College ] .date[ ### 2021/10/11 ] --- class: inverse, top # In class today --- class: inverse, top <!-- slide 1 --> ## Shape Analysis ![](3140_f23_10-11_files/figure-html/unnamed-chunk-2-1.png)<!-- --> --- class: inverse, top <!-- slide 1 --> ## Shape Analysis - Procrustes alignment .pull-left[ ```r min <- out %>% coo_nb() %>% min() align_out <- out %>% coo_interpolate(min) %>% fgProcrustes() ``` ] .pull-right[ ![](https://upload.wikimedia.org/wikipedia/commons/thumb/f/f5/Procrustes_superimposition.png/440px-Procrustes_superimposition.png) ] --- class: inverse, top <!-- slide 1 --> ## Shape Analysis - Procrustes alignment ```r align_out %>% stack ``` ![](3140_f23_10-11_files/figure-html/unnamed-chunk-5-1.png)<!-- --> --- class: inverse, top <!-- slide 1 --> ## Elliptical Fourier Analysis (EFA) .pull-left[ - Describes shapes with harmonics, as series of ellipses - Increasing the number of harmonics increases fit ![](https://miro.medium.com/v2/resize:fit:1400/format:webp/1*tKUOj31pLMO4ZWr4-EzyGw.png) Step 1: Find the major frequency of the harmonics across the array of shapes ] .pull-right[ ![](https://spatial-efd.readthedocs.io/en/latest/_images/figure_1.png) ] --- class: inverse, top <!-- slide 1 --> ## Elliptical Fourier Analysis (EFA) .pull-left[ - Describes shapes with harmonics, as series of ellipses - Increasing the number of harmonics increases fit - Each harmonic has its own set of coefficients: - major and minor axes - angles Step 2: For the number of Fourier-derive harmonics describe the coefficient values for each in each shape ] .pull-right[ ![](https://spatial-efd.readthedocs.io/en/latest/_images/figure_1.png) ] --- class: inverse, top <!-- slide 1 --> ## Elliptical Fourier Analysis (EFA) .pull-left[ ```r EFA_out <- out %>% coo_interpolate(min) %>% fgProcrustes() %>% efourier(norm=T) ``` ``` ## no landmarks defined in $ldk, so trying to work on $coo directly ``` ``` ## 'nb.h' set to 8 (99% harmonic power) ``` ] .pull-right[ ```r EFA_out%>% PCA() %>% plot_PCA() ``` ![](3140_f23_10-11_files/figure-html/unnamed-chunk-7-1.png)<!-- --> ] --- class: inverse, top <!-- slide 1 --> ## Principal Components Analyss (PCA) .pull-left[ - Reduce dimensionality - Regress through dimensions that find most variance - Extract these components ] .pull-right[ ![](https://spatial-efd.readthedocs.io/en/latest/_images/figure_1.png)] ]